Skip to content

Conversation

@yannicklamprecht
Copy link
Contributor

Addresses #13558

@yannicklamprecht yannicklamprecht requested a review from a team as a code owner January 18, 2026 00:49
@github-project-automation github-project-automation bot moved this to Awaiting review in Paper PR Queue Jan 18, 2026
@yannicklamprecht yannicklamprecht force-pushed the issues/13558/copper-state-api branch from 6a066d1 to 8575594 Compare January 18, 2026 14:11
@yannicklamprecht yannicklamprecht force-pushed the issues/13558/copper-state-api branch from 8575594 to b3fd552 Compare January 18, 2026 17:03
Comment on lines +147 to +152
@Override
protected EnumValue.Builder rewriteEnumValue(net.minecraft.world.entity.animal.golem.CopperGolemState state) {
final String name = Formatting.formatKeyAsField(state.getSerializedName());
return EnumValue.builder(name).argument(quoted(state.getSerializedName()));
}
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this part supposed to be exposed or is it only used for the conversion? can just do a.valueOf(b.name()) once it's generated. The javadocs of getId is at least a bit weird.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for conversion. Referenced other enums that have an identifier on both sides.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally prefer this. It allows to do legacy support easily.

@yannicklamprecht yannicklamprecht force-pushed the issues/13558/copper-state-api branch 2 times, most recently from ebdda1c to 695a7c2 Compare January 26, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

3 participants